home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Jul 89 / W0064-Re Dispactching TCo-Jul89 < prev    next >
Encoding:
Text File  |  1989-07-18  |  864 b   |  33 lines  |  [TEXT/GEOL]

  1. Item    6111703                         13-July-89        18:35
  2.  
  3. From:   D2234                           Cock, Calvin, PRT
  4.  
  5. To:     D1382                           MasterPlan, Chris Ovard, PRT
  6.  
  7. cc:     MACAPP.TECH$                    MACAPP Tech
  8.  
  9. Sub:    RE Dispactching TCommands
  10.  
  11. Tom,
  12.  
  13.     I had the same bug reach up and byte me several times.  If you look at the
  14. source code for the TApplication.PerformCommand you will see the following:
  15.  
  16. if gEventLevel = 1 THEN
  17.     UnloadAllSegments;
  18.  
  19. And this does exactly what it says.  So when you call PerformCommand your
  20. calling code segment is unloaded and....pfui.  The way I got around the
  21. problems is to do this:
  22.  
  23. gEventLevel := gEventLevel + 1;
  24. gApplication.PerformCommand ( YourFavoriteCommandHere );
  25. gEventLevel := gEventLevel -1;
  26.  
  27. Hopes this helps you out.
  28.  
  29. Calvin Cock
  30. Applications Design Group
  31.  
  32.  
  33.